package com.itcast.zk.locker.service;
/**
 * <p>Description: </p>
 * @date 
 * @author 
 * @version 1.0
 * <p>Copyright:Copyright(c)2020</p>
 */
public interface ILocker {

    /**
     * 申请分布式锁
     * @param path
     * @param type
     */
    public String acquireDistributedLock(String path, String type);

    /**
     * 申请分布式锁(不等待）
     * @param path
     * @param type
     */
    public String acquireDistributedLockNoWait(String path, String type);

    /**
     * 释放分布式锁
     * @param path
     * @return
     */
    public boolean releaseDistributedLock(String path);


}
